﻿<Window x:Class="Samba.Presentation.Shell"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:cal="http://www.codeplex.com/CompositeWPF"
        Behaviors:RegionPopupBehaviors.CreatePopupRegionWithName="{x:Static Common:RegionNames.SecondaryRegion}"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:Behaviors="clr-namespace:Samba.Presentation.Common.Behaviors;assembly=Samba.Presentation.Common" 
        xmlns:Common="clr-namespace:Samba.Presentation.Common;assembly=Samba.Presentation.Common" 
        xmlns:Presentation="clr-namespace:Samba.Presentation" 
        xmlns:Services="clr-namespace:Samba.Presentation.Common.Services;assembly=Samba.Presentation.Common" 
        Title="Samba Pos Shell" WindowStartupLocation="CenterScreen" WindowStyle="SingleBorderWindow"
        WindowState="Normal" SnapsToDevicePixels="True" Height="600" Width="800" Closing="WindowClosing" 
        Loaded="WindowLoaded" Icon="/Samba.Presentation;component/apple.ico">

    <Window.Background>
        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FF83BBF4" Offset="0"/>
            <GradientStop Color="#FF83BBF4" Offset="0.992"/>
            <GradientStop Color="#FF2873BE" Offset="0.085"/>
        </LinearGradientBrush>
    </Window.Background>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Stretch">
            <Image Source="/Samba.Presentation;component/Images/apple-icon.png" Stretch="UniformToFill"></Image>
            <TextBlock Margin="10,0" FontWeight="Bold" FontSize="24" Foreground="White" MouseDown="TextBlockMouseDown" VerticalAlignment="Center">SAMBA POS</TextBlock>
            <TextBlock Margin="10,0" FontWeight="Bold" MouseDown="TextBlockMouseDown" VerticalAlignment="Center">
                <TextBlock.Text>
                    <Binding Source="{x:Static Services:PresentationServices.SubTitle}" Path="ApplicationTitle"></Binding>
                </TextBlock.Text>
                <TextBlock.Foreground>
                    <Binding Source="{x:Static Services:PresentationServices.SubTitle}" Path="ApplicationTitleColor"></Binding>
                </TextBlock.Foreground>
                <TextBlock.FontSize>
                    <Binding Source="{x:Static Services:PresentationServices.SubTitle}" Path="ApplicationTitleFontSize"></Binding>
                </TextBlock.FontSize>
            </TextBlock>
        </StackPanel>
        <TextBlock Name="TimeLabel" Grid.Row="0" Grid.Column="1" Margin="10,5,10,0" FontSize="18" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Right" FontFamily="Lucida Console">SAAT</TextBlock>

        
        <TabControl Background="LightGray" Grid.Row="1" Grid.ColumnSpan="2" cal:RegionManager.RegionName="MainRegion" SelectedIndex="0" Name="MainTabControl">
            <TabControl.ItemContainerStyle>
                <Style TargetType="{x:Type TabItem}">
                    <Setter Property="Visibility" Value="Collapsed"/>
                </Style>
            </TabControl.ItemContainerStyle>
        </TabControl>
        <Grid Grid.Row="2" Grid.ColumnSpan="2" Background="LightGray">
            <Grid.Resources>
                <Style TargetType="Button">
                    <Setter Property="FontSize" Value="16"/>
                </Style>
            </Grid.Resources>

            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="auto"/>
                <ColumnDefinition Width="auto"/>
            </Grid.ColumnDefinitions>

            <ItemsControl Grid.Column="0" cal:RegionManager.RegionName="UserRegion" Name="UserRegion" Background="Transparent">
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Horizontal"/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
            </ItemsControl>

            <StackPanel Grid.Column="1" Orientation="Horizontal">
                <Presentation:WorkPeriodStatusView></Presentation:WorkPeriodStatusView>
            </StackPanel>

            <StackPanel Grid.Column="2" Orientation="Horizontal">
                <Presentation:MessageClientStatusView></Presentation:MessageClientStatusView>
            </StackPanel>

            <ItemsControl Grid.Column="3" cal:RegionManager.RegionName="RightUserRegion" Name="RightUserRegion" Background="Transparent">
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Horizontal"/>
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
            </ItemsControl>
        </Grid>
    </Grid>
</Window>
